<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script type='text/javascript'>
//  1.将A5F3转成2进制
var  a = 'A5F3'
var  b = parseInt(a,16)
var num =b.toString(2)
console.log(num);
// 2.99乘法表
for(var i=1; i<=9; i++){
    for(var j=1; j<=i; j++){ 
        document.write(i+'*'+j+'='+(i*j)+'&nbsp   ');
    }
       document.write('<br>');  
}
// 3.输入年月，（用数组）
//  3.1.计算当月有多少天
  3.2.计算还剩多少天
var curDate=[prompt('请输入年'),prompt('请输入月份'),prompt('请输入日')]
switch(curDate[1]){
    case'1':
    case'3':
    case'5':
    case'7':
    case'8':
    case'10':
    case'12':
    document.write('本月有31天'+''+'本月还剩'+(31-curDate[2]+'天'))
    break;
    case'2':
    if(curDate[0]%4==0 && curDate[0]%100!==0 ||curDate[0]%400==0){ 
        document.write('本月有29天'+''+'本月还剩'+(29-curDate[2]+'天'));
        break;
    }else{
        document.write('本月有28天'+''+'本月还剩'+(28-curDate[2]+'天'));
        break;
    }
    case '4':
    case '6':
    case '9':
    case '11': 
    document.write('本月有30天'+' '+'本月还剩'+(30-curDate[2])+'天');  
}
    </script>
</body>
</html>